import * as API from "@/api/axios";
import * as util from "@/common/util";

export default {

    // 获取邀请记录分页
    getPageInvitationRecords: (params, page) => {
        const url = util.replacePageNumAndSize(`/manage/invite-rules/{pageNum}/{pageSize}`, page)
        return API.axiosGetAPI(url, params)
    },

    // 获取最新奖励-规则
    getLatest: () => {
        return API.axiosGetAPI('/manage/invite-rules/info')
    },

    //优惠券下拉框
    getCouponId: params => {
        return API.axiosGetAPI('/manage/coupons/box', params)
    },

    // 更新邀请规则
    updateRule: params => {
        const headers = {
            'lang-key': 'branch_Edit'
        }
        return API.axiosPutAPI('/manage/invite-rules/info', params, headers)
    },


}